#ifndef MAIN_WINDOW_HPP
#define MAIN_WINDOW_HPP

#include <QtGui>
#include <QtCore>
#include <QObject>
#include "contact.hpp"

class mainWindow : public QWidget
{
	Q_OBJECT
private:
	QPushButton *addUser;
	QPushButton *send_file;
	QPushButton *downloads;
	QListWidget *contacts;
	QVBoxLayout *layout;
	QFileDialog *file_browser;
	QLineEdit   *h_name;

public:
	mainWindow(QWidget *parent = 0, QString yn = "unknown");

	int 		fd;
	std::string 	h;
	QString 	remoteNick;
	QString 	hostNick;
	QString 	file_path;
	QLineEdit       *send_file_h;
	QLabel	    	*uName;
	QScrollArea	*scroll_area;
	QWidget		*scroll_widget;
	QVBoxLayout     *progress_layout;

	void		 e_file_request(int, char*, int);
	void		 eConnections();

public slots:
	void addContact();
	void addToList();
	void chattingWindow(QListWidgetItem*);
	void response_file_request(int, char*, int);
	void recieve_file(int, char*, int);
	void sending_file(QString);
	void send_f();
signals:
	void incomingConnection();
	void file_request(int, char*, int);
};
#endif //MAIN_WINDOW_HPP
